From: Georges Basile Stavracas Neto Date: Tue, 26 May 2020 14:19:39 +0000 (-0300) Subject: appDisplay: Accept dropping any kind of icon over it X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~122 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2bc81752190adf8f754413836175ab4a15177f4c;p=gnome-shell.git appDisplay: Accept dropping any kind of icon over it The grid will be able to handle them. As of now, it doesn't do anything with folder icons, or icons in folders. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index cbc098082..4d2bd7879 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -912,14 +912,8 @@ class AppDisplay extends BaseAppView { } _canAccept(source) { - if (!(source instanceof AppIcon)) - return false; - - let view = _getViewFromIcon(source); - if (!(view instanceof FolderView)) - return false; - - return true; + return (source instanceof AppIcon) || + (source instanceof FolderIcon); } handleDragOver(source) { @@ -934,7 +928,8 @@ class AppDisplay extends BaseAppView { return false; let view = _getViewFromIcon(source); - view.removeApp(source.app); + if (view instanceof FolderView) + view.removeApp(source.app); if (this._currentDialog) this._currentDialog.popdown();